import request from '@/utils/request'

// 查询实践预约班级学生中间列表
export function listPracticeClassStudent(query) {
  return request({
    url: '/training/practiceClassStudent/list',
    method: 'get',
    params: query
  })
}

// 查询实践预约班级学生中间详细
export function getPracticeClassStudent(practiceClassStudentId) {
  return request({
    url: '/training/practiceClassStudent/' + practiceClassStudentId,
    method: 'get'
  })
}

// 新增实践预约班级学生中间
export function addPracticeClassStudent(data) {
  return request({
    url: '/training/practiceClassStudent',
    method: 'post',
    data: data
  })
}

// 修改实践预约班级学生中间
export function updatePracticeClassStudent(data) {
  return request({
    url: '/training/practiceClassStudent',
    method: 'put',
    data: data
  })
}

// 删除实践预约班级学生中间
export function delPracticeClassStudent(practiceClassStudentId) {
  return request({
    url: '/training/practiceClassStudent/' + practiceClassStudentId,
    method: 'delete'
  })
}
// 添加预约学员
export function addPractice(data) {
  return request({
    url: '/training/practiceClassStudent/addPractice',
    method: 'post',
    data: data
  })
}

// 查询实践预约的学员预约情况
export function getPracticeClassStudents(query) {
  return request({
    url: '/training/practiceClassStudent/students',
    method: 'get',
    params: query
  })
}

// 取消预约，修改预约状态为2
export function editAppointmentStatus(data) {
  return request({
    url: '/training/practiceClassStudent/editAppointmentStatus',
    method: 'put',
    data: data
  })
}

// 查询当前班级实践预约学员情况
export function selectClassStudentAppointmentStatus(query) {
  return request({
    url: '/training/practiceClassStudent/validClassList',
    method: 'get',
    params: query
  })
}
// 查询班级学员的实践签到情况
export function getStudentPracticeCheckIn(classId) {
  return request({
    url: '/training/practiceClassStudent/class/'+classId,
    method: 'get',
  })
}
